/**
 * 
 */
package oldtrigger;

/**
 * @author Philip
 *
 */
public abstract class DirectedResponseFlag extends TriggerFlagger {
	
	public DirectedResponseFlag(Trigger trigger) {
		super(trigger);
	}

	public String getResponse() {
		return getResponse(0);
	}
	
	public String getResponse(int line) {
		if (line == trigger.linesInResponse() - 1) {
			return commandCode() + " " + trigger.getReceiver() + " :" + trigger.getResponse(line);
		}
		
		return commandCode() + " " + trigger.getReceiver() + " :" + trigger.getResponse(line) + "\n" + getResponse(line + 1);
	}

	public abstract String commandCode();
}
